<template>
  <div>
      <!-- <div class="nav">
          <div class="nav_wrapper border-bottom-1px">
              <div class="item" :class="{action:comaction=='item1'}" @click="changecomponent('item1')">
                  绑定已有零壹人
              </div>
              <div class="item" :class="{action:comaction=='item2'}" @click="changecomponent('item2')">
                  注册新零壹人
              </div>
          </div>
      </div> -->
      <div class="head">
          <div class="label_back" @click="back()">
              <i :style="label_back"></i>
          </div>
          <div class="img_box">
              <img :src="userimg" alt="">
          </div>
          <h4 class="username">零壹账号</h4>
      </div>
      <div class="wrapper">
          <component :is="comaction" keep-alive></component>
      </div>
  </div>
</template>
<script>
import item1 from '@/components/zerone/BinZeroneItem1'
// import item2 from '@/components/zerone/BinZeroneItem2'
import userimg from '@/assets/lingyi_logo@2x.png'
export default {
    data(){
        return{
            jifen_bg:{
                backgroundImage: "url(" + require("../../assets/page9_bg@2x.png") + ")",
                backgroundRepeat: "no-repeat",
                backgroundSize: "cover"
            },
            label_back:{
                backgroundImage: "url(" + require("../../assets/label_back@2x.png") + ")",
                backgroundRepeat: "no-repeat",
                backgroundSize: "cover"
            },
            comaction:"item1",
            userimg
        }
    },
    metaInfo: {
      title: "注册账号"
    },
    methods:{
        changecomponent:function(com){
            this.comaction = com;
        },
        back:function(){
            let that = this;
            //跳转用户进来的页面
            if(!that.$store.state.toUrl || that.$store.state.toUrl == "/binzerone" || that.$store.state.toUrl == "/selectadress"){
                that.$router.replace("/");
            }else{
                that.$router.replace(that.$store.state.toUrl);
            }
        }
    },
    components:{
        item1
    }
}
</script>
<style scoped>
.nav_wrapper{
    height: 1.76rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.border-bottom-1px::after{
    border-color: #E4E4E4;
}
.nav_wrapper .item{
    height: 100%;
    line-height: 1.76rem;
    flex: 1;
    color: #424242;
    font-size: .56rem;
    position: relative;
}
.nav_wrapper .action{
    color: #0FB199;
    font-weight:600;
}
.nav_wrapper .action::after{
    content: "";
    display: block;
    width: 1.8rem;
    height: .08rem;
    background: #0FB199;
    border-radius: .12rem;
    position: absolute;
    left: 50%;
    bottom: .24rem;
    transform: translate(-50%,0);
}
.head{
    margin-top: 1.2rem;
    position: relative;
}
.head .label_back{
    width: 2rem;
    height: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left:0;
    top: -1rem;
}
.head .label_back>i{
    display: block;
    width: .38rem;
    height: .68rem;
}
.head .img_box{
    width: 3.14rem;
    height: 3.14rem;
    margin: 0 auto;
    border-radius: 50%;
    border: .1rem solid #ffffff;
    box-shadow: 0 0.16rem 0.24rem #dadada;
}
.head .img_box img{
    width: 100%;
    height: auto;
    border-radius: 50%;
}
.head .username{
    font-size: .64rem;
    font-weight: 500;
    color: #252525;
    margin-top: .28rem;
}
.head  .user_info{
    margin-top: .84rem
}
.head  .user_info p{
    font-size: .6rem;
    color: #383838;
    font-weight: 500;
    margin-top: .2rem;
}
.wrapper{

}

</style>
